package com.db;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import com.db.DbConnection;

public class Delete {
	public Boolean deletePath(int pathid) {

		String sql = "delete from all_path where id='" + pathid+"'";
		Connection con = null;
		int rs=0;
		Map<String, Object> user = null;
		try {
			con = DbConnection.getInstance().getConnection();
			Statement st = con.createStatement();
			rs = st.executeUpdate(sql);
			
			
		} catch (SQLException e) {
			user = null;
			e.printStackTrace();
		} finally {
			try {
				con.close();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		if(rs==0){
			return false;
		}else{
			return true;
		}
	}
	public static void main(){
		Delete a = new Delete();
		a.deletePath(138);
	}
}